// export let List = [

import { List } from "./loginMock";
export default {
  findpwdDate: (config) => {
    console.log("config1：", config);
    let { password, username, phone } = JSON.parse(config.body);
    // let token = { username, password };
    // let token = "";
    List.forEach((item) => {
      if (phone == item.phone) {
        item.password = password;
      }
    });
    console.log(
      "修改后：",
      // "用户" + username,
      "手机" + phone,
      "密码" + password
    );
    // List = this.List;
    // console.log(List);
    // let newList = List;
    // console.log(newList);
    return {
      code: 200,
      msg: "修改成功",
      data: null,
    };
  },
};
